home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / sndhrdw / seibu.h < prev    next >
C/C++ Source or Header  |  2000-04-04  |  3KB  |  104 lines

  1. /***************************************************************************
  2.  
  3.     Seibu Sound System v1.02, games using this include:
  4.  
  5.         Raiden
  6.         Dynamite Duke/The Double Dynamites
  7.         Blood Brothers
  8.         D-Con
  9.         Zero Team
  10.         Legionaire (YM2151 substituted for YM3812)
  11.         Raiden 2 (YM2151 substituted for YM3812, plus extra MSM6205)
  12.         Raiden DX (YM2151 substituted for YM3812, plus extra MSM6205)
  13.         Cup Soccer (YM2151 substituted for YM3812, plus extra MSM6205)
  14.  
  15.     Related sound programs (not implemented yet):
  16.         Dead Angle
  17.         Cabal
  18.  
  19. ***************************************************************************/
  20.  
  21. WRITE_HANDLER( seibu_rst10_ack_w );
  22. WRITE_HANDLER( seibu_rst18_ack_w );
  23. WRITE_HANDLER( seibu_bank_w );
  24. WRITE_HANDLER( seibu_soundclear_w );
  25. void seibu_ym3812_irqhandler(int linestate);
  26. READ_HANDLER( seibu_soundlatch_r );
  27. WRITE_HANDLER( seibu_soundlatch_w );
  28. WRITE_HANDLER( seibu_main_data_w );
  29. void seibu_sound_init_1(void);
  30. void seibu_sound_init_2(void);
  31. void seibu_sound_decrypt(void);
  32. void install_seibu_sound_speedup(int cpu);
  33.  
  34. extern unsigned char *seibu_shared_sound_ram;
  35.  
  36. /**************************************************************************/
  37.  
  38. #define SEIBU_SOUND_SYSTEM_YM3812_MEMORY_MAP(input_port)            \
  39.                                                                     \
  40. static struct MemoryReadAddress sound_readmem[] =                    \
  41. {                                                                    \
  42.     { 0x0000, 0x1fff, MRA_ROM },                                    \
  43.     { 0x2000, 0x27ff, MRA_RAM },                                    \
  44.     { 0x4008, 0x4008, YM3812_status_port_0_r },                        \
  45.     { 0x4010, 0x4012, seibu_soundlatch_r },                         \
  46.     { 0x4013, 0x4013, input_port },                                 \
  47.     { 0x6000, 0x6000, OKIM6295_status_0_r },                        \
  48.     { 0x8000, 0xffff, MRA_BANK1 },                                    \
  49.     { -1 }    /* end of table */                                        \
  50. };                                                                    \
  51.                                                                       \
  52. static struct MemoryWriteAddress sound_writemem[] =                    \
  53. {                                                                    \
  54.     { 0x0000, 0x1fff, MWA_ROM },                                    \
  55.     { 0x2000, 0x27ff, MWA_RAM },                                    \
  56.     { 0x4000, 0x4000, seibu_soundclear_w },                            \
  57.     { 0x4002, 0x4002, seibu_rst10_ack_w },                             \
  58.     { 0x4003, 0x4003, seibu_rst18_ack_w },                             \
  59.     { 0x4007, 0x4007, seibu_bank_w },                                \
  60.     { 0x4008, 0x4008, YM3812_control_port_0_w },                    \
  61.     { 0x4009, 0x4009, YM3812_write_port_0_w },                        \
  62.     { 0x4018, 0x401f, seibu_main_data_w },                            \
  63.     { 0x6000, 0x6000, OKIM6295_data_0_w },                            \
  64.     { -1 }    /* end of table */                                        \
  65. }
  66.  
  67.  
  68. #define SEIBU_SOUND_SYSTEM_YM3812_HARDWARE(freq1,freq2,region)        \
  69.                                                                     \
  70. static struct YM3812interface ym3812_interface =                    \
  71. {                                                                    \
  72.     1,                                                                \
  73.     freq1,                                                            \
  74.     { 50 },                                                            \
  75.     { seibu_ym3812_irqhandler },                                    \
  76. };                                                                    \
  77.                                                                     \
  78. static struct OKIM6295interface okim6295_interface =                \
  79. {                                                                    \
  80.     1,                                                                \
  81.     { freq2 },                                                        \
  82.     { region },                                                        \
  83.     { 40 }                                                            \
  84. }
  85.  
  86. #define SEIBU_SOUND_SYSTEM_CPU(freq)                                \
  87.     CPU_Z80 | CPU_AUDIO_CPU,                                        \
  88.     freq,                                                            \
  89.     sound_readmem,sound_writemem,0,0,                                \
  90.     ignore_interrupt,0
  91.  
  92. #define SEIBU_SOUND_SYSTEM_YM3812_INTERFACE                            \
  93.     {                                                                \
  94.         SOUND_YM3812,                                                \
  95.         &ym3812_interface                                            \
  96.     },                                                                \
  97.     {                                                                \
  98.         SOUND_OKIM6295,                                                \
  99.         &okim6295_interface                                            \
  100.     }
  101.  
  102. /**************************************************************************/
  103.  
  104.